package com.auxgroup.smarthome.service.inner;


import com.auxgroup.smarthome.entity.DeviceInfoEntity;
import com.auxgroup.smarthome.service.DeviceInfoInnerServiceFallback;
import com.auxgroup.smarthome.web.ApiResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by fju on 2017/7/26.
 */
@FeignClient(name="INNER-SERVICE", fallback = DeviceInfoInnerServiceFallback.class)
public interface DeviceInfoInnerService {

    @RequestMapping(value = "/inner/device_did", method = RequestMethod.GET)
    ApiResponse<String> getMappedDid(@RequestParam("deviceId") String deviceId);

    @RequestMapping(value = "/inner/devices",method = RequestMethod.GET)
    ApiResponse<List<DeviceInfoEntity>> getDeviceList(@RequestParam("skip") Integer skip, @RequestParam("limit") Integer limit);

    @RequestMapping(value = "/inner/device_count",method = RequestMethod.GET)
    ApiResponse<Integer> getDeviceCount();

}
